//
//  ContactViewController.swift
//  worldexchange
//
//  Created by xionghao on 2019/4/2.
//  Copyright © 2019 xionghao. All rights reserved.
//

import UIKit

class ContactViewController: QMUICommonViewController {

    @IBOutlet weak var descriptionLabel: UILabel!
    @IBOutlet weak var tipsInfoLabel: UILabel!
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "联系我们".localized()
        self.tipsInfoLabel.text = "如有任何疑问，欢迎随时和我们联络".localized()
        self.descriptionLabel.text = "微信和Line不支持直接添加好友，请打开应用搜索worldchange3并添加为好友".localized()

        // Do any additional setup after loading the view.
    }
    @IBAction func emailClick(_ sender: UIButton) {
        let mailURL = "mailto:\(appEmail)"
        let uri = URL(string: mailURL)
        if  UIApplication.shared.canOpenURL(uri!){
            if #available(iOS 11.0, *) {
                UIApplication.shared.open(uri!, options: [:]) { (_) in
                    
                }
            }else {
                UIApplication.shared.openURL(uri!)

            }
        }
        
    }
    

    @IBAction func faceBookClick(_ sender: Any) {
        let uri = URL(string: "https://www.facebook.com/\(appThirdUser)")
        if  UIApplication.shared.canOpenURL(uri!){
            if #available(iOS 11.0, *) {
                UIApplication.shared.open(uri!, options: [:]) { (_) in
                }
            }else {
                UIApplication.shared.openURL(uri!)
                
            }
        }
    }
    @IBAction func intrClick(_ sender: Any) {
        let uri = URL(string: "https://instagram.com/\(appThirdUser)")
        if  UIApplication.shared.canOpenURL(uri!){
            if #available(iOS 11.0, *) {
                UIApplication.shared.open(uri!, options: [:]) { (_) in
                }
            }else {
                UIApplication.shared.openURL(uri!)
                
            }
        }
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
